import { HttpClient } from "@angular/common/http";
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";

@Component({
  selector: 'iworkflow-detail',
  templateUrl: './index.html',
  styleUrls: ['./style.less']
})
export class DetailComponent implements OnInit {

  workflowDetail: any;

  constructor (private httpClient: HttpClient, private route: ActivatedRoute) {
    
  }

  ngOnInit(): void {
    let paramMap = this.route.snapshot.paramMap;

    let processId = paramMap.get('processId');
    let bizFormId = paramMap.get('bizFormId');

    this.httpClient.get(`/nwf/api/services/leo/Workflow/GetCommonForm?processId=${processId}&bizFormId=${bizFormId}&userId=DC\\LuJuan1`).subscribe(res => {
      this.workflowDetail = res;
    });
  }
}